3.5.33 \(\int \frac {(a+b \log (c (d (e+f x)^p)^q))^2}{(g+h x)^2} \, dx\) [433]

Optimal. Leaf size=144 \[ \frac {(e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(f g-e h) (g+h x)}-\frac {2 b f p q \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \log \left (\frac {f (g+h x)}{f g-e h}\right )}{h (f g-e h)}-\frac {2 b^2 f p^2 q^2 \text {Li}_2\left (-\frac {h (e+f x)}{f g-e h}\right )}{h (f g-e h)} \]

[Out]

(f*x+e)*(a+b*ln(c*(d*(f*x+e)^p)^q))^2/(-e*h+f*g)/(h*x+g)-2*b*f*p*q*(a+b*ln(c*(d*(f*x+e)^p)^q))*ln(f*(h*x+g)/(-
e*h+f*g))/h/(-e*h+f*g)-2*b^2*f*p^2*q^2*polylog(2,-h*(f*x+e)/(-e*h+f*g))/h/(-e*h+f*g)

________________________________________________________________________________________

Rubi [A]
time = 0.14, antiderivative size = 144, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.179, Rules used = {2444, 2441, 2440, 2438, 2495} \begin {gather*} -\frac {2 b^2 f p^2 q^2 \text {PolyLog}\left (2,-\frac {h (e+f x)}{f g-e h}\right )}{h (f g-e h)}-\frac {2 b f p q \log \left (\frac {f (g+h x)}{f g-e h}\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{h (f g-e h)}+\frac {(e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(g+h x) (f g-e h)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*(d*(e + f*x)^p)^q])^2/(g + h*x)^2,x]

[Out]

((e + f*x)*(a + b*Log[c*(d*(e + f*x)^p)^q])^2)/((f*g - e*h)*(g + h*x)) - (2*b*f*p*q*(a + b*Log[c*(d*(e + f*x)^
p)^q])*Log[(f*(g + h*x))/(f*g - e*h)])/(h*(f*g - e*h)) - (2*b^2*f*p^2*q^2*PolyLog[2, -((h*(e + f*x))/(f*g - e*
h))])/(h*(f*g - e*h))

Rule 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 2440

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))]*(b_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Dist[1/g, Subst[Int[(a +
 b*Log[1 + c*e*(x/g)])/x, x], x, f + g*x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[e*f - d*g, 0] && EqQ[g
 + c*(e*f - d*g), 0]

Rule 2441

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Simp[Log[e*((f + g
*x)/(e*f - d*g))]*((a + b*Log[c*(d + e*x)^n])/g), x] - Dist[b*e*(n/g), Int[Log[(e*(f + g*x))/(e*f - d*g)]/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n}, x] && NeQ[e*f - d*g, 0]

Rule 2444

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_)/((f_.) + (g_.)*(x_))^2, x_Symbol] :> Simp[(d + e
*x)*((a + b*Log[c*(d + e*x)^n])^p/((e*f - d*g)*(f + g*x))), x] - Dist[b*e*n*(p/(e*f - d*g)), Int[(a + b*Log[c*
(d + e*x)^n])^(p - 1)/(f + g*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n}, x] && NeQ[e*f - d*g, 0] && GtQ[p, 0
]

Rule 2495

Int[((a_.) + Log[(c_.)*((d_.)*((e_.) + (f_.)*(x_))^(m_.))^(n_)]*(b_.))^(p_.)*(u_.), x_Symbol] :> Subst[Int[u*(
a + b*Log[c*d^n*(e + f*x)^(m*n)])^p, x], c*d^n*(e + f*x)^(m*n), c*(d*(e + f*x)^m)^n] /; FreeQ[{a, b, c, d, e,
f, m, n, p}, x] &&  !IntegerQ[n] &&  !(EqQ[d, 1] && EqQ[m, 1]) && IntegralFreeQ[IntHide[u*(a + b*Log[c*d^n*(e
+ f*x)^(m*n)])^p, x]]

Rubi steps

\begin {align*} \int \frac {\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(g+h x)^2} \, dx &=\text {Subst}\left (\int \frac {\left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right )^2}{(g+h x)^2} \, dx,c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\frac {(e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(f g-e h) (g+h x)}-\text {Subst}\left (\frac {(2 b f p q) \int \frac {a+b \log \left (c d^q (e+f x)^{p q}\right )}{g+h x} \, dx}{f g-e h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\frac {(e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(f g-e h) (g+h x)}-\frac {2 b f p q \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \log \left (\frac {f (g+h x)}{f g-e h}\right )}{h (f g-e h)}+\text {Subst}\left (\frac {\left (2 b^2 f^2 p^2 q^2\right ) \int \frac {\log \left (\frac {f (g+h x)}{f g-e h}\right )}{e+f x} \, dx}{h (f g-e h)},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\frac {(e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(f g-e h) (g+h x)}-\frac {2 b f p q \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \log \left (\frac {f (g+h x)}{f g-e h}\right )}{h (f g-e h)}+\text {Subst}\left (\frac {\left (2 b^2 f p^2 q^2\right ) \text {Subst}\left (\int \frac {\log \left (1+\frac {h x}{f g-e h}\right )}{x} \, dx,x,e+f x\right )}{h (f g-e h)},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\frac {(e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(f g-e h) (g+h x)}-\frac {2 b f p q \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \log \left (\frac {f (g+h x)}{f g-e h}\right )}{h (f g-e h)}-\frac {2 b^2 f p^2 q^2 \text {Li}_2\left (-\frac {h (e+f x)}{f g-e h}\right )}{h (f g-e h)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.13, size = 200, normalized size = 1.39 \begin {gather*} \frac {b^2 f p^2 q^2 (g+h x) \log ^2(e+f x)-2 b f p q (g+h x) \log (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )+\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \left (a (f g-e h)+b (f g-e h) \log \left (c \left (d (e+f x)^p\right )^q\right )+2 b f p q (g+h x) \log \left (\frac {f (g+h x)}{f g-e h}\right )\right )+2 b^2 f p^2 q^2 (g+h x) \text {Li}_2\left (\frac {h (e+f x)}{-f g+e h}\right )}{h (-f g+e h) (g+h x)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*(d*(e + f*x)^p)^q])^2/(g + h*x)^2,x]

[Out]

(b^2*f*p^2*q^2*(g + h*x)*Log[e + f*x]^2 - 2*b*f*p*q*(g + h*x)*Log[e + f*x]*(a + b*Log[c*(d*(e + f*x)^p)^q]) +
(a + b*Log[c*(d*(e + f*x)^p)^q])*(a*(f*g - e*h) + b*(f*g - e*h)*Log[c*(d*(e + f*x)^p)^q] + 2*b*f*p*q*(g + h*x)
*Log[(f*(g + h*x))/(f*g - e*h)]) + 2*b^2*f*p^2*q^2*(g + h*x)*PolyLog[2, (h*(e + f*x))/(-(f*g) + e*h)])/(h*(-(f
*g) + e*h)*(g + h*x))

________________________________________________________________________________________

Maple [F]
time = 0.21, size = 0, normalized size = 0.00 \[\int \frac {\left (a +b \ln \left (c \left (d \left (f x +e \right )^{p}\right )^{q}\right )\right )^{2}}{\left (h x +g \right )^{2}}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*(d*(f*x+e)^p)^q))^2/(h*x+g)^2,x)

[Out]

int((a+b*ln(c*(d*(f*x+e)^p)^q))^2/(h*x+g)^2,x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(d*(f*x+e)^p)^q))^2/(h*x+g)^2,x, algorithm="maxima")

[Out]

2*a*b*f*p*q*(log(f*x + e)/(f*g*h - h^2*e) - log(h*x + g)/(f*g*h - h^2*e)) - b^2*(log(((f*x + e)^p)^q)^2/(h^2*x
 + g*h) - integrate(((f*h*q^2*log(d)^2 + 2*f*h*q*log(c)*log(d) + f*h*log(c)^2)*x + (h*q^2*log(d)^2 + 2*h*q*log
(c)*log(d) + h*log(c)^2)*e + 2*(f*g*p*q + (f*h*p*q + f*h*q*log(d) + f*h*log(c))*x + (h*q*log(d) + h*log(c))*e)
*log(((f*x + e)^p)^q))/(f*h^3*x^3 + g^2*h*e + (2*f*g*h^2 + h^3*e)*x^2 + (f*g^2*h + 2*g*h^2*e)*x), x)) - 2*a*b*
log(((f*x + e)^p*d)^q*c)/(h^2*x + g*h) - a^2/(h^2*x + g*h)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(d*(f*x+e)^p)^q))^2/(h*x+g)^2,x, algorithm="fricas")

[Out]

integral((b^2*log(((f*x + e)^p*d)^q*c)^2 + 2*a*b*log(((f*x + e)^p*d)^q*c) + a^2)/(h^2*x^2 + 2*g*h*x + g^2), x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (a + b \log {\left (c \left (d \left (e + f x\right )^{p}\right )^{q} \right )}\right )^{2}}{\left (g + h x\right )^{2}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*(d*(f*x+e)**p)**q))**2/(h*x+g)**2,x)

[Out]

Integral((a + b*log(c*(d*(e + f*x)**p)**q))**2/(g + h*x)**2, x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(d*(f*x+e)^p)^q))^2/(h*x+g)^2,x, algorithm="giac")

[Out]

integrate((b*log(((f*x + e)^p*d)^q*c) + a)^2/(h*x + g)^2, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (a+b\,\ln \left (c\,{\left (d\,{\left (e+f\,x\right )}^p\right )}^q\right )\right )}^2}{{\left (g+h\,x\right )}^2} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*log(c*(d*(e + f*x)^p)^q))^2/(g + h*x)^2,x)

[Out]

int((a + b*log(c*(d*(e + f*x)^p)^q))^2/(g + h*x)^2, x)

________________________________________________________________________________________